def max_min(lst):
    max = min = 0
    for i, v in enumerate(lst):
        if(v > lst[max]): 
            max = i
        if(i < lst[min]):
            min = i

    return max, min


lst = [7, 1, 3, 9, 5]
print(max_min(lst))